package top.kuxiao.crmserver.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import top.kuxiao.crmserver.service.IOpportunityStateService;
import top.kuxiao.crmserver.utils.Auth;
import top.kuxiao.crmserver.utils.ResultUtil;

/**
 * <p>
 * 销售机会状态 前端控制器
 * </p>
 *
 * @author kuxiao
 * @since 2022-01-12
 */
@RestController
@RequestMapping("/opportunity-state")
@CrossOrigin
public class OpportunityStateController {
    @Autowired
    IOpportunityStateService service;

    @Auth("SE,AM")
    @RequestMapping(value = "list", method = RequestMethod.POST)
    public ResultUtil queryAll(){
        return ResultUtil.resObj(service.list());
    }
}
